import { http } from '@/utils/request'
import type { InterfaceParams, InterfaceList, QueryParams } from './type'

const prefix = '/bizapi'
// 列表
export function getInterfaceList(params: QueryParams & Page) {
	return http.get<ResPage<InterfaceList[]>>(`${prefix}/interface/biz/list`, params)
}

// 删除表数据
export function delInterfaceInfo(interfaceId: string) {
	return http.delete(`${prefix}/interface/biz/${interfaceId}`)
}

export function addType(data: InterfaceParams) {
	return http.post(`${prefix}/interface/biz`, data)
}

// 修改字典类型
export function updateType(data: InterfaceParams) {
	return http.put(`${prefix}/interface/biz`, data)
}
